import java.awt.*;

public class HealthPack {
    int x, y;
    private boolean live = true;
    private TankClient tc;

    public HealthPack(int x, int y, TankClient tc) {
        this.x = x;
        this.y = y;
        this.tc = tc;
    }

    public void draw(Graphics g) {
        if (!live) return;
        Color c = g.getColor();
        g.setColor(Color.GREEN);
        g.fillRect(x, y, 20, 20);
        g.setColor(c);
    }

    public Rectangle getRect() {
        return new Rectangle(x, y, 20, 20);
    }

    public boolean isLive() {
        return live;
    }

    public void setLive(boolean live) {
        this.live = live;
    }
}